#!/usr/bin/env php
<?php

$client = new GearmanClient();
$client->setTimeout(500);
$client->addServer('127.0.0.1', 4730);

$result = @$client->do('reverse', 'Hello world!');

if ($client->returnCode() == GEARMAN_TIMEOUT)
  print "No result due to timeout!\n";
else
  print "$result\n";

?>
